/*
 * @Description: 
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2023-02-20 14:15:40
 * @LastEditTime: 2023-03-22 17:44:27
 * @FilePath: \cscec-pms-admin\src\api\construction\overdueNodeManagement.js
 */
import request from '@/utils/request2'
import request1 from '@/utils/request'
import { projectApiUrl} from '@/api/config'

// 周计划服务前缀 发版时去掉 -yuantao
const tempServerUrl = "project-producer-server"
const api = {
  queryList: projectApiUrl + '/overdueNode/query-list',
  detail: projectApiUrl + '/overdueNode/detail',
  overdueNodeExportExcl: projectApiUrl + '/overdueNode/overdue-node-export-excl',
  updateOverdueNodeWarning: projectApiUrl + '/overdueNode/update-overdue-node-warning',
  submitApproval: projectApiUrl + '/overdueNode/submit-approval',
  queryWeekPlanList: tempServerUrl + '/overdueNodeWeek/getPageOverdueNodeWeek',
  belongWeekSelect: tempServerUrl + '/scheduleNodeWeek/belongWeekSelect',
  overdueNodeExportExcel: tempServerUrl + '/overdueNodeWeek/overdue-node-export-excel',
  weekPlanDetail: tempServerUrl + '/overdueNodeWeek/getOverdueNodeWeekById',
  updateWeekPlanOverdueNodeWarning: tempServerUrl + '/overdueNodeWarningWeek/updateByPrimaryKeySelective',
  submitWeekPlanApproval: tempServerUrl + '/overdueNodeWeek/submitApproval',
  //竣工收尾计划开始
  overdueNodeCompletionQueryList: projectApiUrl + '/overdueNodeCompletion/query-list',
  overdueNodeCompletionDetail: projectApiUrl + '/overdueNodeCompletion/detail',
  overdueNodeCompletionUpdateOverdueNodeWarning: projectApiUrl + '/overdueNodeCompletion/update-overdue-node-warning',
  overdueNodeCompletionSubmitWeekPlanApproval: projectApiUrl + '/overdueNodeCompletion/submit-approval',
  overdueNodeCompletionExportExcl: projectApiUrl + '/overdueNodeCompletion/overdue-node-export-excl',
  //竣工收尾计划结束
  //合同计划开始
  overdueNodeContractQueryList: projectApiUrl + '/overdueNodeContract/query-list',
  overdueNodeContractDetail: projectApiUrl + '/overdueNodeContract/detail',
  overdueNodeContractUpdateOverdueNodeWarning: projectApiUrl + '/overdueNodeContract/update-overdue-node-warning',
  overdueNodeContractSubmitWeekPlanApproval: projectApiUrl + '/overdueNodeContract/submit-approval',
  overdueNodeContractExportExcl: projectApiUrl + '/overdueNodeContract/overdue-node-export-excl',
  //合同计划开始结束

  //月计划开始
  overdueNodeMonthPage: tempServerUrl + '/overdueNodeMonth/page',
  overdueNodeMonthDetail: tempServerUrl + '/overdueNodeMonth/detail',
  overdueNodeWarningMonthUpdate: tempServerUrl + '/overdueNodeWarningMonth/update',
  overdueNodeWarningMonthProcess: tempServerUrl + '/overdueNodeWarningMonth/submit/process',
  overdueNodeMonthExcel: tempServerUrl + '/overdueNodeMonth/excel',
  //月计划结束
}
export default {
  /**
    * @description: 获取逾期节点管理列表
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  queryList: data => {
    return request({
      url: api.queryList,
      method: 'post',
      data
    })
  },
  /**
    * @description: 获取逾期节点管理详情
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  detail: data => {
    return request({
      url: `${api.detail}/${data}`,
      method: 'post'
    })
  },
  /**
    * @description: 导出
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  overdueNodeExportExcl: data => {
    return request1({
      url: api.overdueNodeExportExcl,
      method: 'post',
      data,
      responseType: 'blob'
    })
  },
  /**
    * @description: 编辑逾期节点
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  updateOverdueNodeWarning: data => {
    return request({
      url: api.updateOverdueNodeWarning,
      method: 'post',
      data
    })
  },
  /**
    * @description: 提交审批
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  submitApproval: data => {
    return request({
      url: api.submitApproval,
      method: 'post',
      data
    })
  },
  /**
    * @description: 获取逾期节点管理列表(周计划)
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  queryWeekPlanList: data => {
    return request({
      url: api.queryWeekPlanList,
      method: 'post',
      data
    })
  },
  /**
    * @description: 【所属周】下拉数据接口
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  belongWeekSelect: data => {
    return request({
      url: api.belongWeekSelect,
      method: 'post',
      data
    })
  },
  /**
    * @description: 逾期节点导出Excel(周计划)
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  overdueNodeExportExcel: data => {
    return request1({
      url: api.overdueNodeExportExcel,
      method: 'post',
      data,
      responseType: 'blob'
    })
  },
  /**
    * @description: 获取逾期节点管理详情(周计划)
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  weekPlanDetail: query => {
    return request({
      url: api.weekPlanDetail,
      method: 'get',
      params: query
    })
  },
  /**
    * @description: 编辑逾期节点(周计划)
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  updateWeekPlanOverdueNodeWarning: data => {
    return request({
      url: api.updateWeekPlanOverdueNodeWarning,
      method: 'post',
      data
    })
  },
  /**
    * @description: 提交审批(周计划)
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  submitWeekPlanApproval: data => {
    return request({
      url: api.submitWeekPlanApproval,
      method: 'post',
      data
    })
  },
  /**
    * @description: 竣工收尾计划 - 列表
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  overdueNodeCompletionQueryList: data => {
    return request({
      url: api.overdueNodeCompletionQueryList,
      method: 'post',
      data
    })
  },
    /**
    * @description:  竣工收尾计划详情
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
    overdueNodeCompletionDetail: data => {
      return request({
        url: `${api.overdueNodeCompletionDetail}/${data.id}`,
        method: 'post'
      })
    },
     /**
    * @description: 编辑竣工收尾计划逾期节点
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
    overdueNodeCompletionUpdateOverdueNodeWarning: data => {
    return request({
      url: api.overdueNodeCompletionUpdateOverdueNodeWarning,
      method: 'post',
      data
    })
  },
    /**
    * @description: 竣工收尾计划提交审批(周计划)
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
    overdueNodeCompletionSubmitWeekPlanApproval: data => {
      return request({
        url: api.overdueNodeCompletionSubmitWeekPlanApproval,
        method: 'post',
        data
      })
    },
      /**
    * @description: 竣工收尾计划导出
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  overdueNodeCompletionExportExcl: data => {
    return request1({
      url: api.overdueNodeCompletionExportExcl,
      method: 'post',
      data,
      responseType: 'blob'
    })
  },
     /**
    * @description: 合同计划 - 列表
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
   overdueNodeContractQueryList: data => {
    return request({
      url: api.overdueNodeContractQueryList,
      method: 'post',
      data
    })
  },
     /**
    * @description: 合同计划详情
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  overdueNodeContractDetail: data => {
    return request({
      url: `${api.overdueNodeContractDetail}/${data.id}`,
      method: 'post'
    })
  },
       /**
    * @description: 编辑合同计划逾期节点
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
 overdueNodeContractUpdateOverdueNodeWarning: data => {
  return request({
    url: api.overdueNodeContractUpdateOverdueNodeWarning,
    method: 'post',
    data
  })
},
  /**
    * @description: 合同计划提交审批(周计划)
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  overdueNodeContractSubmitWeekPlanApproval: data => {
      return request({
        url: api.overdueNodeContractSubmitWeekPlanApproval,
        method: 'post',
        data
      })
    },
    /**
    * @description: 合同计划导出
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  overdueNodeContractExportExcl: data => {
    return request1({
      url: api.overdueNodeContractExportExcl,
      method: 'post',
      data,
      responseType: 'blob'
    })
  },
   /**
    * @description: 月计划 - 列表
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
   overdueNodeMonthPage: data => {
      return request({
        url: api.overdueNodeMonthPage,
        method: 'post',
        data
      })
    },
  /**
    * @description: 获取逾期节点管理详情(月计划)
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  overdueNodeMonthDetail: query => {
    return request({
      url: api.overdueNodeMonthDetail,
      method: 'get',
      params: query
    })
  },
    /**
    * @description: 编辑月计划逾期节点
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
    overdueNodeWarningMonthUpdate: data => {
      return request({
        url: api.overdueNodeWarningMonthUpdate,
        method: 'post',
        data
      })
    },
      /**
    * @description: 提交流程(月计划)
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  overdueNodeWarningMonthProcess: query => {
    return request({
      url: api.overdueNodeWarningMonthProcess,
      method: 'get',
      params: query
    })
  },
    /**
    * @description: 合同计划导出
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
    overdueNodeMonthExcel: data => {
        return request1({
          url: api.overdueNodeMonthExcel,
          method: 'post',
          data,
          responseType: 'blob'
        })
      },
}